package lgy.kunpeng.homework;

import java.util.Scanner;

public class op08 {
    public static void main(String[] args) {
        int year;
        int mon;
        int day;
        int Day[]={0,31,28,31,30,31,30,31,31,30,31,30};
        Scanner input = new Scanner(System.in);
        System.out.println("输入年份");
        year = input.nextInt();
        System.out.println("输入月份");
        mon = input.nextInt();
        System.out.println("输入日期");
        day = input.nextInt();
        if (year%4==0&&year%100!=0||year%400==0) {
            Day[2] = 29;
        }
        else{
            Day[2]=28;
        }
        int numOfDay=0;
        for(int i=0;i<mon;i++){
            numOfDay+=Day[i];
        }
        numOfDay+=day;
        System.out.println(mon+"月"+day+"日是"+year+"年的第"+numOfDay+"天");
    }
}
